/**
 * Copyright By Nanjing Fujitsu Nanda Software Technology Co., Ltd
 * 上午8:37:12
 * position.java
 * 
 */
package com.fujitsu.nanjing.mobile.model;

import org.ksoap2.serialization.KvmSerializable;
import org.ksoap2.serialization.PropertyInfo;

import java.util.Hashtable;

/**
 * @author qixb.fnst 地理信息
 * 
 */
public class Position implements KvmSerializable {

    private int positionId;
    private String positionName;
    private String bigName;
    private String smallName;
    private String XGps;
    private String YGps;

    @Override
    public String toString() {
        return "Position [positionId=" + positionId + ", positionName="
                + positionName + ", bigName=" + bigName + ", smallName="
                + smallName + ", XGps=" + XGps + ", YGps=" + YGps + "]";
    }

    public int getPositionId() {
        return positionId;
    }

    public void setPositionId(int positionId) {
        this.positionId = positionId;
    }

    public String getPositionName() {
        return positionName;
    }

    public void setPositionName(String positionName) {
        this.positionName = positionName;
    }

    public String getBigName() {
        return bigName;
    }

    public void setBigName(String bigName) {
        this.bigName = bigName;
    }

    public String getSmallName() {
        return smallName;
    }

    public void setSmallName(String smallName) {
        this.smallName = smallName;
    }

    public String getXGps() {
        return XGps;
    }

    public void setXGps(String xGps) {
        XGps = xGps;
    }

    public String getYGps() {
        return YGps;
    }

    public void setYGps(String yGps) {
        YGps = yGps;
    }

    @Override
    public Object getProperty(int arg0) {
        switch (arg0) {
        case 0:

            return this.positionId;
        case 1:

            return this.positionName;
        case 2:

            return this.bigName;
        case 3:

            return this.smallName;
        case 4:

            return this.XGps;

        case 5:

            return this.YGps;

        default:
            break;
        }
        return null;
    }

    @Override
    public int getPropertyCount() {
        return 6;
    }

    @SuppressWarnings("rawtypes")
    @Override
    public void getPropertyInfo(int arg0, Hashtable arg1, PropertyInfo arg2) {
        switch (arg0) {
        case 0:
            arg2.name = "positionId";
            arg2.type = PropertyInfo.INTEGER_CLASS;
            break;
        case 1:
            arg2.name = "positionName";
            arg2.type = PropertyInfo.STRING_CLASS;
            break;
        case 2:
            arg2.name = "bigName";
            arg2.type = PropertyInfo.STRING_CLASS;
            break;
        case 3:
            arg2.name = "smallName";
            arg2.type = PropertyInfo.STRING_CLASS;
            break;
        case 4:
            arg2.name = "XGps";
            arg2.type = PropertyInfo.STRING_CLASS;
            break;
        case 5:
            arg2.name = "YGps";
            arg2.type = PropertyInfo.STRING_CLASS;
            break;

        default:
            break;
        }

    }

    @Override
    public void setProperty(int arg0, Object arg1) {
        switch (arg0) {
        case 0:
            this.positionId = Integer.parseInt(arg1.toString());
            break;
        case 1:
            this.positionName = arg1.toString();
            break;
        case 2:
            this.bigName = arg1.toString();
            break;
        case 3:
            this.smallName = arg1.toString();
            break;
        case 4:
            this.XGps = arg1.toString();
            break;
        case 5:
            this.YGps = arg1.toString();
            break;

        default:
            break;
        }

    }

}
